package cn.com.sbell.vss.csg.vap;

import org.dom4j.Element;

import cn.com.sbell.vss.VssConstants;
import cn.com.sbell.vss.VssException;
import cn.com.sbell.vss.csg.vap.bean.NetManageInfo;
import cn.com.sbell.vss.csg.vsclient.VsClient;
import cn.com.sbell.vss.csg.vsclient.util.PropertiesHolder;

public class SetNetManageInfo extends ProtectedVsCommander {

	protected Element executeCommand(VsClient vsClient,
			PropertiesHolder holder, Element root) {
		NetManageInfo netManageInfo = (NetManageInfo) holder.populate(new NetManageInfo());
				
		if(!vsClient.setNetManageInfo(netManageInfo)){
			throw new VssException(VssConstants.CODE_VS_SETNETMANAGEINFO_FAILED);
		}
		return root;
	}

}
